package com.example.li.controller;


import com.example.li.model.Admin;
import com.example.li.service.AdminService;
import com.example.li.util.ResultDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/admin")
public class AdminController {
    @Autowired
    AdminService adminService;
//管理员登录
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    public ResultDTO login(@RequestBody Admin admin) {
        return adminService.login(admin);
    }
}
